import os,sys

os.chdir(r'C:\Users\wei\avSpider')
sys.path.append('.')
import imgSpider
s= imgSpider.ImgSpider()
#s.crawl_image('http://996ced53.tinybucks.net/', 'test.jpg')

'''
def rget(url, url2):
	req = urllib2.Request(url)
	req.add_header('referer', url2)
	df = open("debug_output", 'wb+')
	df.write(urllib2.urlopen(req).read())
	df.close()
def raget(url, url2):
	req = urllib2.Request(url)
	req.add_header('referer', url2)
	req.add_header('User-agent', 'Chrome')
	df = open("debug_output.txt", 'w+')
	df.write(urllib2.urlopen(req).read())
	df.close()
'''
